import request from '@/utils/request'

export function getApplyResultList() {
  return request({
    url: '/result/admin/list',
    method: 'get',
  })
}

export function getApplyList(data) {
  return request({
    url: '/apply/teacher/list',
    method: 'get',
    params: data
  })
}

export function examineApply(data) {
  return request({
    url: `/apply/examine/${data.id}/${data.status}`,
    method: 'put',
  })
}

export function getExportRes() {
  return request({
    url: "/result/export",
    method: 'get',
    responseType: 'blob',
  })
}

export function getResultList() {
  return request({
    url: "/result/post",
    method: 'post'
  })
}

export function saveApply(data) {
  return request({
    url: "/apply/save",
    method: 'post',
    data
  })
}

export function updateApply(data) {
  return request({
    url: "/apply/save/" + data.applyId,
    method: 'put',
    data: data.list
  })
}